package com.sinochem.yunlian.ship.base.enume;

import lombok.Getter;

/**
 * @Auther: wanghui
 * @Dscription: 版本更新枚举
 * @Date: Created in 13:43 2017/12/26
 **/
public enum VersionType {

    NOT_UPDATE(0,"不升级"),
    FORCE_UPDATE(1,"强制升级"),
    NOT_FORCE_UPDATE(2,"不强制升级");

    @Getter
    private int typeCode;

    @Getter
    private String typeName;

    VersionType(int typeCode, String typeName){
        this.typeCode = typeCode;
        this.typeName = typeName;
    }

    public static String valueOf(int typeCode ){
        switch (typeCode){
            case (0):
                return NOT_UPDATE.typeName;
            case (1):
                return FORCE_UPDATE.typeName;
            case (2):
                return NOT_FORCE_UPDATE.typeName;
        }
        return "";
    }
}
